#ifndef __WORD_H__
#define __WORD_H__

#include "BaseWord.h"

// a standard word
class Word :
public BaseWord
{
	public:
		// Size of the word
		static const unsigned short WORD_SIZE = 5;

		// TODO, thomasde: replace with a computation based on WORD_SIZE and DISTINCT_BYTE_VALUES
		static const signed long MAX_VALUE = 1073741823;

		// TODO, thomasde: replace with a computation based on WORD_SIZE and DISTINCT_BYTE_VALUES
		static const signed long MIN_VALUE = -1073741823;

		// constructor
		Word(void);

		// constructor
		// sign: sign of the word
		// values: values of the bytes
		Word(const signed char sign, const unsigned char values[]);

		// destructor
		~Word(void);

		// Gets the Operation Code (C)
		unsigned char op_code() const;

		// Gets the Modification Code (F)
		unsigned char modification_code() const;

		// unwraps the value of the modification code in its left and right aspects
		// left: address of variable in which to store the left value
		// right: address of variable in which to store the right value
		void unwrap_modification_code(unsigned short &left, unsigned short &right) const;

		// Gets the Index Specification (I)
		unsigned char index_specification() const;
};
#endif
